<!-- 会员充值账户流水表单弹窗 -->
<form id="memberrechargerecord-form" lay-filter="memberrechargerecord-form" class="layui-form model-form" style="overflow:auto; height:500px;width:90%;">
    <input name="id" type="hidden"/>
    				    <div class="layui-form-item">
        <label class="layui-form-label">编号</label>
        <div class="layui-input-block">
            <input name="rechargeCode" placeholder="请输入编号" type="text" class="layui-input" maxlength="20"  id="rechargeCode"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">会员名称</label>
        <div class="layui-input-block">
            <input name="memberId" placeholder="请输入商家ID" type="hidden" class="layui-input" maxlength="20"  id="memberId"
                   lay-verify="required" required/>
            <input name="userName" placeholder="请输入商家ID" type="text" class="layui-input" maxlength="20"  id="userName"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">充值时间</label>
        <div class="layui-input-block">
            <input name="createTime" placeholder="请输入充值时间" type="text" class="layui-input" maxlength="20"  id="createTime"
                   lay-verify="required"  readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">账户充值金额</label>
        <div class="layui-input-block">
            <input name="rechargeMoney" placeholder="请输入账户充值金额" type="text" class="layui-input" maxlength="20"  id="rechargeMoney"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">充值账户后余额</label>
        <div class="layui-input-block">
            <input name="rechargeBalance" placeholder="请输入充值账户后余额" type="text" class="layui-input" maxlength="20"  id="rechargeBalance"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">业务类型</label>
        <div class="layui-input-block">
            <input name="type" placeholder="请输入1,充值 2,支付佣金 3,冻结佣金" type="hidden" class="layui-input" maxlength="20"  id="type"
                   lay-verify="required" required/>
            <input name="strType" type="text" class="layui-input" maxlength="20"  id="strType"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">流水描述</label>
        <div class="layui-input-block">
            <input name="comment" placeholder="请输入流水描述" type="text" class="layui-input" maxlength="20"  id="comment"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">交易凭证</label>
        <div class="layui-input-block">
            <input name="payNo" placeholder="请输入" type="text" class="layui-input" maxlength="20"  id="payNo"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">交易状态</label>
        <div class="layui-input-block">
            <input name="status" placeholder="请输入0 未支付 1 已支付" type="hidden" class="layui-input" maxlength="20"  id="status"
                   lay-verify="required" required/>
            <input name="strStatus"  type="text" class="layui-input" maxlength="20"  id="strStatus"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">充值商家</label>
        <div class="layui-input-block">
            <input name="businessId" placeholder="请输入充值 商家" type="hidden" class="layui-input" maxlength="20"  id="businessId"
                   lay-verify="required" required/>
            <input name="businessName" placeholder="请输入充值 商家" type="text" class="layui-input" maxlength="20"  id="businessName"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">支付订单</label>
        <div class="layui-input-block">
            <input name="payOrderId" placeholder="请输入支付订单 ID" type="text" class="layui-input" maxlength="20"  id="payOrderId"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">充值编号</label>
        <div class="layui-input-block">
            <input name="rechargeId" placeholder="请输入充值套餐ID" type="text" class="layui-input" maxlength="20"  id="rechargeId"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">赠送金额</label>
        <div class="layui-input-block">
            <input name="giverechargeMoney" placeholder="请输入账户赠送金额" type="text" class="layui-input" maxlength="20"  id="giverechargeMoney"
                   lay-verify="required" readonly required/>
        </div>
    </div>
     <div class="layui-form-item model-form-footer">
        <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
        <!--<button class="layui-btn" lay-filter="user-form-submit" lay-submit>保存</button>-->
    </div>
</form>

<script>
    layui.use(['layer', 'admin', 'form', 'formSelects'], function () {
        var layer = layui.layer;
        var admin = layui.admin;
        var form = layui.form;
        var formSelects = layui.formSelects;
 
        var memberrechargerecord = admin.getTempData('t_memberrechargerecord');
           if (memberrechargerecord.method=="update"){
               if(memberrechargerecord.type==1){
                   memberrechargerecord.strType="充值";
               }else if(memberrechargerecord.type==2){
                   memberrechargerecord.strType="支付佣金";
               }else if(memberrechargerecord.type==3){
                   memberrechargerecord.strType="冻结佣金";
               }
                if(memberrechargerecord.status==0){
                    memberrechargerecord.strStatus="未支付";
                }else{
                    memberrechargerecord.strStatus="已支付";
                }

        	form.val('memberrechargerecord-form', memberrechargerecord);
            form.render();
        }
        // 表单提交事件
        form.on('submit(user-form-submit)', function (data) {
             layer.load(2);
            
            admin.req('member/memberrechargerecord/'+memberrechargerecord.method, JSON.stringify(data.field), function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                }
            }, "post");  
            return false;
        });
    });
</script>
